﻿using System.Collections.Generic;
using System.Web.UI.WebControls;
using System.Linq;

namespace OpenWaves.Web
{
    public static class ListControlExtensions
    {
         public static IEnumerable<ListItem> GetSelectedItems(this ListControl control)
         {
             return control.Items.Cast<ListItem>().Where(i => i.Selected);
         }
    }
}